import httpInstance from "@/utils/http.js";
export const getCategories = (id) => {
  return httpInstance({
    url: "/category",
    params:{
      id
    }
  })
}
//如果 id = 123，Axios 会将 params 中的内容转换为：GET /category?id=123
export const getCategoryFilterAPI = (id) => {
  return httpInstance({
    url:'/category/sub/filter',
    params:{
      id
    }
  })
}
/**
 * @description: 获取导航数据
 * @data {
     categoryId: 1005000 ,
     page: 1,
     pageSize: 20,
     sortField: 'publishTime' | 'orderNum' | 'evaluateNum'
   }
 * @return {*}
 */
export const getSubCategoryAPI = (data) => {
  return httpInstance({
    url:'/category/goods/temporary',
    method:'POST',
    data
  })
}
